<page-header [title]="pageTitle" [autoBreadcrumb]="false" [action]="action">
  <ng-template #action>
    <button
      nz-button
      (click)="add($event)"
      [nzType]="'primary'"
      [nzSize]="'large'"
    >
      新建
    </button>
  </ng-template>
</page-header>

<div class="ngx-alain__page-content-nz-card">
  <nz-card [nzBordered]="false">
    <div>
      <sf
        #sf
        mode="search"
        [schema]="schemaData.search"
        [formData]="tableParams"
        (formSubmit)="searchSubmit(st, $event)"
        (formReset)="st.reset(tableParams)"
        class="search-form"
        [button]="'none'"
      >
        <nz-form-item class="sf-btns">
          <nz-form-control class="ant-form-item-control-wrapper">
            <div class="ant-form-item-control">
              <button
                type="submit"
                nz-button
                [nzType]="'primary'"
                [nzLoading]="st.stloading"
              >
                查询
              </button>
            </div>
          </nz-form-control>
          <nz-form-control class="ant-form-item-control-wrapper">
            <div class="ant-form-item-control">
              <button nz-button (click)="appCase.exportXlsFromSt(st)">
                导出
              </button>
            </div>
          </nz-form-control>
        </nz-form-item>
      </sf>
    </div>
  </nz-card>

  <nz-card [nzBordered]="false">
    <div nz-row nzGutter="16">
      <div
        nz-col
        [nzSpan]="userSrv.userInfo.is_group ? '5' : '24'"
        [nzLg]="userSrv.userInfo.is_group ? '5' : '24'"
        nzXs="24"
        *ngIf="userSrv.userInfo.is_group"
      >
        <nz-card>
          <div
            [jstree]="jstree"
            (jstreeChange)="jstreeChange($event)"
            class="jstree"
          ></div>
        </nz-card>
      </div>
      <div
        nz-col
        [nzSpan]="userSrv.userInfo.is_group ? '19' : '24'"
        [nzLg]="userSrv.userInfo.is_group ? '19' : '24'"
        nzXs="24"
      >
        <st
          #st
          [data]="dataSource.url"
          [columns]="tableData.col"
          [req]="tableReq"
          (change)="stChange($event)"
        ></st>
      </div>
    </div>
  </nz-card>
</div>
